package com.aiit.dao;

import com.aiit.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Set;

@Mapper
public interface RoleDao {

    /**
     * 根据用户id查询该用户具有的角色列表
     * @param userId
     * @return
     * @throws Exception
     */
 /* @Select("select r.rolename from t_role as r\n" + "inner  join  t_user_role as ur " +
            "on ur.roleid=r.roleid\n" + " where  ur.userid=#{userId}")*/
    Set<Role> findRoleListByUserId(@Param("userId") int userId) ;


}
